package com.example.demo.service.impl

import com.example.demo.service.DeviceCommandService
import com.example.demo.service.MqttSender
import com.zaxxer.hikari.util.ClockSource.currentTime
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.stereotype.Service

@Service
class DeviceCommandServiceImpl : DeviceCommandService {


    @Autowired
    private lateinit var mqttSender: MqttSender

  override  fun openGate(sn: String) {
        mqttSender.sendToMqtt("/server/device/status",sn)
    }
}